Problem Note 45756: Excel raises exception when publishing to a PDF file in SAS® Financial Management
Excel - Office 2007 raises an Exception when publishing to PDF
When running the SAS Financial Management Add-in for Microsoft Excel with Microsoft Office 2007, publishing or saving as a PDF might fail. To replicate the error follow these steps:
- Create a report in the Excel client. Ensure that the report contains at least one slicer and at least two members within that slicer.
- Select "Publish" and then "Report" from the FM Excel toolbar.
- Select "Create a new Report", enter a Name and "Static" for type. Click "Next".
- Select "PDF" for the file type. "Entire workbook" should be selected as the scope. Click "Next".
- Select at least one slicer in the next window. Click "Next".
- Select two members associated with the slicer. Click "Next".
- Select "Create a single report". Click "next".
- Select "Local folder" as the delivery method. Provide a valid folder name. Click "next".
- Select "Do not save report settings". Click "Next".
- Click "Finish" on the summary window.
You might get the following exception:
[mm/dd/yyyy hh:mm:ss] --------------- EXCEPTION REPORT ---------------
[mm/dd/yyyy hh:mm:ss] System.ArgumentException: Value does not fall within the
expected range.
at
Microsoft.Office.Interop.Excel.WorkbookClass.ExportAsFixedFormat(XlFixedFormatType
Type, Object Filename, Object Quality, Object IncludeDocProperties, Object
IgnorePrintAreas, Object From, Object To, Object OpenAfterPublish, Object
FixedFormatExtClassPtr)
at SASSESExcelAddIn.Publish.saveAsPDF(PublishDistribution
publishDistribution, String& fileName, Workbook wb) in
C:\Users\chconr\Documents\Visual Studio 2010\FM5.3_Testing\Controller\Excel\Publish.cs:line 1528
at SASSESExcelAddIn.Publish.publishReportDetails() in
C:\Users\chconr\Documents\Visual Studio 2010\FM5.3_Testing\Controller\Excel\Publish.cs:line 1020
[mm/dd/yyyy hh:mm:ss] System.Runtime.InteropServices.COMException (0x800A03EC):
Exception from HRESULT: 0x800A03EC
at Microsoft.Office.Interop.Excel._Worksheet.Select(Object Replace)
at SASSESExcelAddIn.Publish.publishReport() in
C:\Users\chconr\Documents\Visual Studio 2010\FM5.3_Testing\Controller\Excel\Publish.cs:line 1770
[mm/dd/yyyy hh:mm:ss] ----------- END OF EXCEPTION REPORT ------------
This failure occurs because Office2007 does not provide the functionality of saving a workbook as a PDF by default. To publish a PDF, a PDF Add-in can be easily downloaded from the MS Web site:
http://www.microsoft.com/download/en/details.aspx?id=9943
Operating System and Release Information
SAS System | SAS Financial Management | Microsoft® Windows® for x64 | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 for x64 | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2008 | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Microsoft Windows Server 2008 for x64 | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Windows 7 Enterprise 32 bit | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Windows 7 Enterprise x64 | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Windows 7 Home Premium 32 bit | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Windows 7 Home Premium x64 | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Windows 7 Professional 32 bit | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Windows 7 Professional x64 | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Windows 7 Ultimate 32 bit | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Windows 7 Ultimate x64 | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Windows Vista | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
Windows Vista for x64 | 5.3 | 5.3 | 9.3 TS1M0 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
SAS Financial Management Add-in for Excel raises exception (System.ArgumentException) when publishing to a PDF file in Office 2007
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2012-02-24 09:20:45 |
Date Created: | 2012-02-22 10:05:37 |